﻿using System;
using System.ComponentModel;

namespace ExFlash.Records
{
    [TypeConverter(typeof(ExpandableObjectConverter))]
    public class MorphLineStyle : ISwfSerializable
    {
        public ushort StartWidth
        {
            get;
            protected set;
        }

        public ushort EndWidth
        {
            get;
            protected set;
        }

        public RGBARecord StartColor
        {
            get;
            protected set;
        }

        public RGBARecord EndColor
        {
            get;
            protected set;
        }

        #region ISwfSerializable Members

        public virtual void SwfDeserialize(BinaryBitReader reader)
        {
            StartWidth = reader.ReadUInt16();

            EndWidth = reader.ReadUInt16();

            StartColor = new RGBARecord();
            StartColor.SwfDeserialize(reader);

            EndColor = new RGBARecord();
            EndColor.SwfDeserialize(reader);
        }

        public virtual void SwfSerialize(byte[] arr, ref int offset)
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}
